Private

'---- TTransformComponent

Function lugi_glue_TTransformComponent_GetRotation_1fIjEy:Int( lua_vm:Byte Ptr )
	Local obj:TTransformComponent = TTransformComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushnumber( lua_vm, obj.GetRotation() )

	Return 1

End Function


Function lugi_glue_TTransformComponent_SetRotation_DEGjQD:Int( lua_vm:Byte Ptr )
	Local obj:TTransformComponent = TTransformComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	If 2 <= lua_gettop(lua_vm) Then
		_arg_1 = lua_tonumber(lua_vm, 2)
	EndIf

	lua_pushinteger( lua_vm, obj.SetRotation(_arg_1) )

	Return 1

End Function


Function lugi_glue_TTransformComponent_SetScale_ptcxAK:Int( lua_vm:Byte Ptr )
	Local obj:TTransformComponent = TTransformComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	If 2 <= lua_gettop(lua_vm) Then
		_arg_1 = lua_tonumber(lua_vm, 2)
	EndIf

	lua_pushinteger( lua_vm, obj.SetScale(_arg_1) )

	Return 1

End Function


Function lugi_glue_TTransformComponent_GetScale_N6IEmz:Int( lua_vm:Byte Ptr )
	Local obj:TTransformComponent = TTransformComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushnumber( lua_vm, obj.GetScale() )

	Return 1

End Function


Function lugi_glue_TTransformComponent_AddRotation_pPwvvK:Int( lua_vm:Byte Ptr )
	Local obj:TTransformComponent = TTransformComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	If 2 <= lua_gettop(lua_vm) Then
		_arg_1 = lua_tonumber(lua_vm, 2)
	EndIf

	lua_pushinteger( lua_vm, obj.AddRotation(_arg_1) )

	Return 1

End Function

'---- TPhysicsComponent

Function lugi_glue_TPhysicsComponent_SetAcceleration_yMDD61:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	Local _arg_2:Float = 0#
	' Get arguments off stack
	Select lua_gettop(lua_vm)
		Case 1
			' no arguments provided

		Case 2
			_arg_1 = lua_tonumber(lua_vm, 2)

		Default
			_arg_1 = lua_tonumber(lua_vm, 2)
			_arg_2 = lua_tonumber(lua_vm, 3)
	End Select ' Arguments retrieved from stack

	lua_pushinteger( lua_vm, obj.SetAcceleration(_arg_1, _arg_2) )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_ResetAcceleration_R1wxie:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushinteger( lua_vm, obj.ResetAcceleration() )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_AddAcceleration_1c4iHj:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	Local _arg_2:Float = 0#
	' Get arguments off stack
	Select lua_gettop(lua_vm)
		Case 1
			' no arguments provided

		Case 2
			_arg_1 = lua_tonumber(lua_vm, 2)

		Default
			_arg_1 = lua_tonumber(lua_vm, 2)
			_arg_2 = lua_tonumber(lua_vm, 3)
	End Select ' Arguments retrieved from stack

	lua_pushinteger( lua_vm, obj.AddAcceleration(_arg_1, _arg_2) )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_GetAcceleration_iKMFAa:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushbmaxobject( lua_vm, obj.GetAcceleration() )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_SetFriction_x1fW2A:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	If 2 <= lua_gettop(lua_vm) Then
		_arg_1 = lua_tonumber(lua_vm, 2)
	EndIf

	lua_pushinteger( lua_vm, obj.SetFriction(_arg_1) )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_GetFriction_QGd1eU:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushnumber( lua_vm, obj.GetFriction() )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_SetVelocity_xV3uJi:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:Float = 0#
	Local _arg_2:Float = 0#
	' Get arguments off stack
	Select lua_gettop(lua_vm)
		Case 1
			' no arguments provided

		Case 2
			_arg_1 = lua_tonumber(lua_vm, 2)

		Default
			_arg_1 = lua_tonumber(lua_vm, 2)
			_arg_2 = lua_tonumber(lua_vm, 3)
	End Select ' Arguments retrieved from stack

	lua_pushinteger( lua_vm, obj.SetVelocity(_arg_1, _arg_2) )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_SetVelocityV_TFIFUR:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))
	Local _arg_1:TVector2D = Null
	If 2 <= lua_gettop(lua_vm) Then
		_arg_1 = TVector2D(lua_tobmaxobject(lua_vm, 2))
	EndIf

	lua_pushinteger( lua_vm, obj.SetVelocityV(_arg_1) )

	Return 1

End Function


Function lugi_glue_TPhysicsComponent_GetVelocity_OJCIFN:Int( lua_vm:Byte Ptr )
	Local obj:TPhysicsComponent = TPhysicsComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushbmaxobject( lua_vm, obj.GetVelocity() )

	Return 1

End Function

'---- TExpirationComponent

Function lugi_glue_TExpirationComponent_GetUpdatesLeft_3e2Xdz:Int( lua_vm:Byte Ptr )
	Local obj:TExpirationComponent = TExpirationComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushinteger( lua_vm, obj.GetUpdatesLeft() )

	Return 1

End Function


Function lugi_glue_TExpirationComponent_HasExpired_aD1HqK:Int( lua_vm:Byte Ptr )
	Local obj:TExpirationComponent = TExpirationComponent(lua_tobmaxobject(lua_vm, 1))

	lua_pushinteger( lua_vm, obj.HasExpired() )

	Return 1

End Function

'---- ArtemaxInterface
Global lugi_lugi_glob_ArtemaxInterface_nEgRhU:ArtemaxInterface = New ArtemaxInterface

Function lugi_glue_ArtemaxInterface_GetTransformComponent_3apRQY:Int( lua_vm:Byte Ptr )
	Local obj:ArtemaxInterface = lugi_lugi_glob_ArtemaxInterface_nEgRhU
	Local _arg_1:TEntity = Null
	If 1 <= lua_gettop(lua_vm) Then
		_arg_1 = TEntity(lua_tobmaxobject(lua_vm, 1))
	EndIf

	lua_pushbmaxobject( lua_vm, obj.GetTransformComponent(_arg_1) )

	Return 1

End Function


Function lugi_glue_ArtemaxInterface_GetPhysicsComponent_YHrznG:Int( lua_vm:Byte Ptr )
	Local obj:ArtemaxInterface = lugi_lugi_glob_ArtemaxInterface_nEgRhU
	Local _arg_1:TEntity = Null
	If 1 <= lua_gettop(lua_vm) Then
		_arg_1 = TEntity(lua_tobmaxobject(lua_vm, 1))
	EndIf

	lua_pushbmaxobject( lua_vm, obj.GetPhysicsComponent(_arg_1) )

	Return 1

End Function


Function lugi_glue_ArtemaxInterface_GetPositionComponent_TXFjp6:Int( lua_vm:Byte Ptr )
	Local obj:ArtemaxInterface = lugi_lugi_glob_ArtemaxInterface_nEgRhU
	Local _arg_1:TEntity = Null
	If 1 <= lua_gettop(lua_vm) Then
		_arg_1 = TEntity(lua_tobmaxobject(lua_vm, 1))
	EndIf

	lua_pushbmaxobject( lua_vm, obj.GetPositionComponent(_arg_1) )

	Return 1

End Function


Function lugi_glue_ArtemaxInterface_GetExpirationComponent_6HiN4X:Int( lua_vm:Byte Ptr )
	Local obj:ArtemaxInterface = lugi_lugi_glob_ArtemaxInterface_nEgRhU
	Local _arg_1:TEntity = Null
	If 1 <= lua_gettop(lua_vm) Then
		_arg_1 = TEntity(lua_tobmaxobject(lua_vm, 1))
	EndIf

	lua_pushbmaxobject( lua_vm, obj.GetExpirationComponent(_arg_1) )

	Return 1

End Function

'---- MaxInterface
Global lugi_lugi_glob_MaxInterface_w3gRO7:MaxInterface = New MaxInterface

Function lugi_glue_MaxInterface_KeyDown_6Eo7o9:Int( lua_vm:Byte Ptr )
	Local obj:MaxInterface = lugi_lugi_glob_MaxInterface_w3gRO7
	Local _arg_1:Int = 0
	If 1 <= lua_gettop(lua_vm) Then
		Select lua_type(lua_vm, 1)
			Case LUA_TBOOLEAN
				_arg_1 = lua_toboolean(lua_vm, 1)
			Default
				_arg_1 = lua_tointeger(lua_vm, 1)
		End Select
	EndIf

	lua_pushboolean( lua_vm, obj.lKeyDown(_arg_1) )

	Return 1

End Function


Function lugi_glue_MaxInterface_KeyHit_ZBsI5d:Int( lua_vm:Byte Ptr )
	Local obj:MaxInterface = lugi_lugi_glob_MaxInterface_w3gRO7
	Local _arg_1:Int = 0
	If 1 <= lua_gettop(lua_vm) Then
		Select lua_type(lua_vm, 1)
			Case LUA_TBOOLEAN
				_arg_1 = lua_toboolean(lua_vm, 1)
			Default
				_arg_1 = lua_tointeger(lua_vm, 1)
		End Select
	EndIf

	lua_pushinteger( lua_vm, obj.lKeyHit(_arg_1) )

	Return 1

End Function

Function lugi_p_lugi_initpre_MAZezgybCuN5CELk(lua_vm:Byte Ptr, register_field(off%, typ%, name$, class@ Ptr), register_method(luafn:Int(state:Byte Ptr), name$, class@ Ptr))
	' Register instance method TTransformComponent#GetRotation
	register_method( lugi_glue_TTransformComponent_GetRotation_1fIjEy, "GetRotation", Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )
	' Register instance method TTransformComponent#SetRotation
	register_method( lugi_glue_TTransformComponent_SetRotation_DEGjQD, "SetRotation", Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )
	' Register instance method TTransformComponent#SetScale
	register_method( lugi_glue_TTransformComponent_SetScale_ptcxAK, "SetScale", Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )
	' Register instance method TTransformComponent#GetScale
	register_method( lugi_glue_TTransformComponent_GetScale_N6IEmz, "GetScale", Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )
	' Register instance method TTransformComponent#AddRotation
	register_method( lugi_glue_TTransformComponent_AddRotation_pPwvvK, "AddRotation", Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )

	' Register instance method TPhysicsComponent#SetAcceleration
	register_method( lugi_glue_TPhysicsComponent_SetAcceleration_yMDD61, "SetAcceleration", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#ResetAcceleration
	register_method( lugi_glue_TPhysicsComponent_ResetAcceleration_R1wxie, "ResetAcceleration", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#AddAcceleration
	register_method( lugi_glue_TPhysicsComponent_AddAcceleration_1c4iHj, "AddAcceleration", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#GetAcceleration
	register_method( lugi_glue_TPhysicsComponent_GetAcceleration_iKMFAa, "GetAcceleration", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#SetFriction
	register_method( lugi_glue_TPhysicsComponent_SetFriction_x1fW2A, "SetFriction", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#GetFriction
	register_method( lugi_glue_TPhysicsComponent_GetFriction_QGd1eU, "GetFriction", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#SetVelocity
	register_method( lugi_glue_TPhysicsComponent_SetVelocity_xV3uJi, "SetVelocity", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#SetVelocityV
	register_method( lugi_glue_TPhysicsComponent_SetVelocityV_TFIFUR, "SetVelocityV", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	' Register instance method TPhysicsComponent#GetVelocity
	register_method( lugi_glue_TPhysicsComponent_GetVelocity_OJCIFN, "GetVelocity", Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )

	' Register instance method TExpirationComponent#GetUpdatesLeft
	register_method( lugi_glue_TExpirationComponent_GetUpdatesLeft_3e2Xdz, "GetUpdatesLeft", Byte Ptr(TTypeID.ForName("TExpirationComponent")._class) )
	' Register instance method TExpirationComponent#HasExpired
	register_method( lugi_glue_TExpirationComponent_HasExpired_aD1HqK, "HasExpired", Byte Ptr(TTypeID.ForName("TExpirationComponent")._class) )

	' Register global method ArtemaxInterface#GetTransformComponent
	register_method( lugi_glue_ArtemaxInterface_GetTransformComponent_3apRQY, "GetTransformComponent", Null )
	' Register global method ArtemaxInterface#GetPhysicsComponent
	register_method( lugi_glue_ArtemaxInterface_GetPhysicsComponent_YHrznG, "GetPhysicsComponent", Null )
	' Register global method ArtemaxInterface#GetPositionComponent
	register_method( lugi_glue_ArtemaxInterface_GetPositionComponent_TXFjp6, "GetPositionComponent", Null )
	' Register global method ArtemaxInterface#GetExpirationComponent
	register_method( lugi_glue_ArtemaxInterface_GetExpirationComponent_6HiN4X, "GetExpirationComponent", Null )

	' Register global method MaxInterface#lKeyDown
	register_method( lugi_glue_MaxInterface_KeyDown_6Eo7o9, "KeyDown", Null )
	' Register global method MaxInterface#lKeyHit
	register_method( lugi_glue_MaxInterface_KeyHit_ZBsI5d, "KeyHit", Null )

End Function
New LuGIInitFunction.PreInit(lugi_p_lugi_initpre_MAZezgybCuN5CELk, False)


Function lugi_p_lugi_initpost_o98oECXQXB4OqhQs(lua_vm:Byte Ptr, constructor:Int(state:Byte Ptr))
	' Register constructor for TTransformComponent
	lua_pushlightuserdata( lua_vm, Byte Ptr(TTypeID.ForName("TTransformComponent")._class) )
	lua_pushcclosure( lua_vm, constructor, 1 )
	lua_setfield( lua_vm, LUA_GLOBALSINDEX, "NewTTransformComponent" )
	' Register constructor for TPhysicsComponent
	lua_pushlightuserdata( lua_vm, Byte Ptr(TTypeID.ForName("TPhysicsComponent")._class) )
	lua_pushcclosure( lua_vm, constructor, 1 )
	lua_setfield( lua_vm, LUA_GLOBALSINDEX, "NewTPhysicsComponent" )
	' Register constructor for TExpirationComponent
	lua_pushlightuserdata( lua_vm, Byte Ptr(TTypeID.ForName("TExpirationComponent")._class) )
	lua_pushcclosure( lua_vm, constructor, 1 )
	lua_setfield( lua_vm, LUA_GLOBALSINDEX, "NewTExpirationComponent" )
End Function
New LuGIInitFunction.PostInit(lugi_p_lugi_initpost_o98oECXQXB4OqhQs)



Public

